<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>

  <fmt:setBundle basename="ApplicationMessage" />
  <fmt:setLocale value="zh_CN" />

  <%@ include file="/WEB-INF/include/meta.jsp"%>
  <%@ include file="/WEB-INF/include/css.jsp"%>
  <link href="${ctx.resource}/css/select2.css" rel="stylesheet">
  <link href="${ctx.resource}/css/select2-bootstrap.css" rel="stylesheet">
  <link href="${ctx.resource}/css/bootstrap-datepicker3.min.css" rel="stylesheet">
  <title>银行到账流水 - 租房宝金融管理平台</title>

</head>
<body>

  <%@ include file="/WEB-INF/include/header.jsp"%>
  
  <div class="web-g-main">

    <%@ include file="/WEB-INF/include/aside.jsp"%>
    <div class="content">
      <header class="header clearfix">
          <h3 class="pull-left">银行到账流水查询</h3>
       </header>
       <form method="GET" action="${ctx}/flow/app-receipt/search"> 
         <input type="hidden" name="app-filter" value="true" >
         <div class="row">
                          
           <div class="col-xs-12">
           
            <div class="input-daterange-title pull-left"><label>支付时间</label></div>
             <div class="input-daterange input-group pull-left">
               <input type="text" class="input-sm form-control" name="start" value="${start}" />
               <span class="input-group-addon">至</span>
               <input type="text" class="input-sm form-control" name="end" value="${end}"/>
             </div>
             <div class="btn-group pull-right">
               <button class="btn btn-default btn-shadow btn-shadow-default demo2do-btn" ><i class="glyphicon glyphicon-search"></i>&nbsp;&nbsp;查询</button>
             </div>
           </div>
         </div>

         </form>
         <c:if test="${not empty infoMessage}">
              <div class="alert alert-success alert-dismissable alert-fade top-margin-10 text-align-center">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                <i class="glyphicon glyphicon-info-sign"></i>&nbsp;&nbsp;
                <fmt:message key="${infoMessage}" />
              </div>
         </c:if>
         <div class="table-area">
        <div class="col-md-1">
          <span>单位:元</span>
        </div>
         <table class="data-list">
              <thead>
                <tr>
                  <th>入账时间</th>
                  <th>借贷标志</th>
                  <th>发生额(交易金额)</th>
                  <th>凭证号</th>
                  <th>对方账号</th>
                  <th>对方户名</th>
                  <th>收款账号</th>
          <th>摘要</th>
          <th>附言</th>                
                </tr>
              </thead>
              <tbody>
                <c:forEach var="appArriveRecord" items="${appArriveRecordList}">
                    <tr>
                      <td><fmt:formatDate value="${appArriveRecord.time}" pattern="yyyy/MM/dd HH:mm:SS" /></td>
                      <td><c:choose><c:when test= "${not empty appArriveRecord.drcrf and appArriveRecord.drcrf eq 1}">借</c:when><c:otherwise>贷</c:otherwise></c:choose></td>
                      <td><fmt:formatNumber value="${appArriveRecord.amount}"  type="currency"/></td>
                      <td>${appArriveRecord.vouhNo}</td>
                      <td>${appArriveRecord.payAcNo}</td>
                      <td>${appArriveRecord.payName}</td>
                      <td>${appArriveRecord.receiveAcNo}</td>
                      <td>${appArriveRecord.summary}</td>
                      <td>${appArriveRecord.remark}</td>
                    </tr>
                </c:forEach>
              </tbody>
          </table>
         </div>
         <div class = "row">
            <div class="col-md-2 col-md-offset-10" >
                                             合计：<c:choose><c:when test="${not empty appArriveRecordList }">${fn:length(appArriveRecordList)}</c:when><c:otherwise>0</c:otherwise></c:choose>条
        </div>
        </div>
        <c:choose>
            <c:when test="${not empty queryString}">
              <jsp:include page="/WEB-INF/include/page.jsp">
                <jsp:param name="url" value="flow/app-receipt/search" />
                <jsp:param name="queryString" value="${queryString}" />
              </jsp:include>
            </c:when>
            <c:otherwise>
              <jsp:include page="/WEB-INF/include/page.jsp">
                <jsp:param value="flow/app-receipt" name="url" />
              </jsp:include>
            </c:otherwise>
        </c:choose>
       <%@ include file="/WEB-INF/include/footer.jsp"%>
       
    </div>

  </div>

  <%@ include file="/WEB-INF/include/script.jsp"%>
  <script src="${ctx.resource}/js/bootstrap-switch.min.js"></script>
  <script src="${ctx.resource}/js/bootstrap-modal-trigger.js"></script>
  <script src="${ctx.resource}/js/select2.min.js"></script>
  <script src="${ctx.resource}/js/select2_locale_zh-CN.js"></script>
  <script src="${ctx.resource}/js/bootstrap.validate.js"></script>
  <script src="${ctx.resource}/js/bootstrap.validate.en.js"></script>
  <script src="${ctx.resource}/js/earth-preupload.js"></script>
  <script src="${ctx.resource}/js/bootstrap-alert-fade-trigger.js"></script>

  <script src="${ctx.resource}/js/bootstrap-datepicker.js"></script>
  <script src="${ctx.resource}/js/bootstrap-datepicker.zh-CN.js"></script>

  <script type="text/javascript">
  
  	$(document).ready(function() {
  		$('.input-daterange').datepicker({
  	        format: "yyyy-mm-dd",
  	        todayBtn: "linked",
  	        language: "zh-CN",
  	        orientation: "top left",
  	        autoclose: true,
  	        todayHighlight: true
  	      });
  	})
    
  </script>
  
  
</body>
</html>
